package com.roc.steelend.controller;


import com.roc.steelend.pojo.Department;
import com.roc.steelend.service.DepartmentService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@Api(tags = "员工部门功能接口")
@CrossOrigin
public class DepartmentController {

    @Autowired
    private DepartmentService departmentService;

    @GetMapping("/v1/department/show/all")
    @ApiOperation(value = "展示所有的部门",notes = "不需要值")
    public List<Department> findAllDepartmentData(){

      return   departmentService.findAllDepartmentData();
    }
}
